<!DOCTYPE html>
<html>
<head>
    <title>${session.SOFT_NAME }_智能办公系统</title>
    <%include("/app/resapi/mobilestyle.html"){}%>
    <style type="text/css">
        .grids-icon {
            height: 1.2rem;
        }
        .jb{
            width: 20px;
            height: 20px;
            position: absolute;
            border-radius: 10px;
            background-color: coral;
            right: 20px;
            top:20px;
            color: white;
            font-size: 12px;
            font-weight: 600;
            line-height: 20px;
            text-align: center;
        }
        .app-item{

        }
    </style>
</head>
<body>
<section class="g-flexview">
    <div class="g-scrollview" style="background-color: #eee;">
        <div class="m-slider" data-ydui-slider>
            <div class="slider-wrapper">
                <div class="slider-item">
                    <a href="#">
                        <img src="/mobile/img/banner1.png">
                    </a>
                </div>
                <div class="slider-item">
                    <a href="#">
                        <img src="/mobile/img/banner2.png">
                    </a>
                </div>
                <div class="slider-item">
                    <a href="#">
                        <img src="/mobile/img/banner3.png">
                    </a>
                </div>
            </div>
            <div class="slider-pagination"></div>
        </div>
        <%
        var memuList = appMenuList.PERSONDESK;
        if(memuList!=null)
        {
        %>
        <div class="m-grids-4">
            <div class="m-gridstitle">个人办公</div>
            <%
            for(item in memuList)
            {
            %>
            <a class="grids-item" href="${item.appUrl}?r=${r}" target="_self">
                <div class="grids-icon"><img alt="" src="${item.img}"/></div>
                <div class="grids-txt">${item.title}</div>
            </a>
            <%}%>
        </div>
        <%
        }%>
        <%
        memuList = appMenuList.BPM;
        if(memuList!=null)
        {
        %>
        <div class="m-grids-4">
            <div class="m-gridstitle">BPM流程</div>
            <%
            for(item in memuList)
            {
            %>
            <a class="grids-item" href="${item.appUrl}?r=${r}" target="_self">
                <div class="grids-icon">
                    <img alt="" src="${item.img}"/>
                    <% if(item.module=='dobpm') {%>
                    <div class="jb" id="dobpmjb">0</div>
                    <% }%>
                </div>
                <div class="grids-txt">${item.title}</div>
            </a>
            <%}%>
        </div>
        <%
        }%>

        <%
        memuList = appMenuList.DOCUMENT;
        if(memuList!=null)
        {
        %>
        <div class="m-grids-4">
            <div class="m-gridstitle">公文流程</div>
            <%
            for(item in memuList)
            {
            %>
            <a class="grids-item" href="${item.appUrl}?r=${r}" target="_self">
                <div class="grids-icon">
                    <img alt="" src="${item.img}"/>
                    <% if(item.module=='dodocument') {%>
                    <div class="jb" id="dodocumentjb">0</div>
                    <% }%>
                </div>
                <div class="grids-txt">${item.title}</div>
            </a>
            <%}%>
        </div>
        <%
        }%>
        <%
        memuList = appMenuList.MYFILE;
        if(memuList!=null)
        {
        %>
        <div class="m-grids-4">
            <div class="m-gridstitle">数据共享</div>
            <%
            for(item in memuList)
            {
            %>
            <a class="grids-item" href="${item.appUrl}?r=${r}" target="_self">
                <div class="grids-icon"><img alt="" src="${item.img}"/></div>
                <div class="grids-txt">${item.title}</div>
            </a>
            <%}%>
        </div>
        <%
        }%>

    </div>

</section>
</body>
<%include("/app/resapi/mobilejs.html"){}%>
<script>
    $(function(){
        $.ajax({
            url: "/ret/bpmget/getBpmJb",
            type: "post",
            dataType: "json",
            success: function (data) {
                if (data.status == "200") {
                    if(data.list>99)
                    {
                        $("#dobpmjb").html(data.list+"+");
                    }else {
                        $("#dobpmjb").html(data.list);
                    }
                }
            }
        });
        $.ajax({
            url: "/ret/documentget/getDocumentJb",
            type: "post",
            dataType: "json",
            success: function (data) {
                if (data.status == "200") {
                    if(data.list>99)
                    {
                        $("#dodocumentjb").html(data.list+"+");
                    }else {
                        $("#dodocumentjb").html(data.list);
                    }
                }
            }
        });
    })
</script>
</html>
